<include file="../Public/header.html" />
<script src="__PUBLIC__/Js/flashSlider/photo-switch.js" type="text/javascript"></script>
<script type="text/javascript" src="__PUBLIC__/Js/flashSlider/flashslider.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.2&services=true"></script>
<script type="text/javascript" src="__PUBLIC__/Js/kim.base.map.js"></script>
<style>
/** 首页商品图片hover式样 **/
.duclist:hover{
	background-color: #FBF5EF;
}
.p_pg{
 	background-color: #EEEEEE;
}
.tag_bg_selected{
	padding:3px 10px;
	background-color: #CC1214;
	color:#ffffff;
}
.tag_bg{
	padding:3px 10px;
	background-color: #ffffff;
	color:#666666;
}
.tag_bg:hover{
	background-color: #EEEEEE;
	color:#666666;
}
.duclist em {
    bottom: 5px;
    color: #FFFFFF;
    height: 22px;
    right: 15px;
    line-height: 22px;
    position: absolute;
    text-align: right;
    width: 120px;
    z-index: 2;
	font-weight: bold;
	display:none;
}
.duclist span {
    background: none repeat scroll 0 0 #000000;
    bottom: 5px;
    height: 22px;
    left: 10px;
    opacity: 0.5;
	filter:alpha(opacity=50); 
    position: absolute;
    width: 123px;
    z-index: 1;
	display:none;
}
.duclist:hover em {
	display:block;
}
.duclist:hover span {
	display:block;
}

.duclist .peisong{
	display:block;
 	bottom: 108px;
    color: #FFFFFF;
    height: 22px;
    right: 108px;
    line-height: 22px;
    position: absolute;
    text-align: right;
    width: 25px;
    z-index: 2;
	font-weight: bold;
}

</style>
<script type="text/javascript">
jQuery(document).ready(function() {
	//$('#flash_box').switchboxaction({Time:5000,SwitchTime:3000,SwitchMode:'Hover',AutoStart:true,SwitchEffect:'fadeOut'});
	$('#flash_box').switchboxaction({Time:5000,SwitchTime:3000,switchindex:'#switch_bar',onclass:'switch_bar_on',SwitchMode:'Hover',AutoStart:true,SwitchEffect:'fadeOut'});
	//picrun_ini();
	initMap("map-box","39.925","116.385",11);
		cleanAll();
	var store_infos = eval('( ' + $('#store_json_data').html() + ' )');
	store_markers = drawStoreMarkers(store_infos,marker_icon);
	
	//在地图上显示第一个店的信息框
	<php>if(count($partners)>0){ $_tmp_i = rand(0,count($partners)-1);echo $_tmp_i; </php>
	
	var _ttmp_marker = getStoreMarker( "{$partners[$_tmp_i].id}" );
	if(_ttmp_marker!=null){
		var _infoWindow = getStoreInfoWindow(new BMap.Size(0, _ttmp_marker.marker.getIcon().size.height*(-1) ),_ttmp_marker.storeinfo);
		_ttmp_marker.marker.openInfoWindow(_infoWindow);
	}
	<php>}</php>
	_initproduct();
});

/**
 * 返回店铺列表后，页面执行的初始化方法。
 */
function _initproduct(){
	$('#products_list').find('#p_detail').each(function(){
		//alert(333);
		$(this).hover(
				function(){
					//当鼠标放上去的时候,程序处理
					
					var brand_id = $(this).attr('rel');
					//alert(brand_id);
					var _ttmp_markers = getStoreMarkerByBrandId(brand_id);
					//alert(_ttmp_markers);
					var _ttmp_marker;
					if(_ttmp_markers.length>0){
						for(var i =0;i<_ttmp_markers.length;i++){
							_ttmp_marker = _ttmp_markers[i];
							_ttmp_marker.marker.setIcon(marker_icon_hover);
							var _infoWindow = getStoreInfoWindow(new BMap.Size(0, _ttmp_marker.marker.getIcon().size.height*(-1) ),_ttmp_marker.storeinfo);
							_ttmp_marker.marker.openInfoWindow(_infoWindow);
						}
					}
					$(this).addClass();
				},

				function(){
				   	//当鼠标离开的时候,程序处理
					var brand_id = $(this).attr('rel');
					var _ttmp_markers = getStoreMarkerByBrandId(brand_id);
					var _ttmp_marker;
					if(_ttmp_markers.length>0){
						for(var i =0;i<_ttmp_markers.length;i++){
							_ttmp_marker = _ttmp_markers[i];
							_ttmp_marker.marker.setIcon(marker_icon);
							//_ttmp_marker.marker.closeInfoWindow();
						}
					}
				}
		);
	});
}

</script>
<div class="blank10"></div>
<!--=======left start========-->
<div class="primary_content">
    <!--======banner start=====-->
    <div class="banner" id=J_banner_show style="height:300px; position: relative; width: 743px;float:left;">
		<!--动画上测 -->
		<ul id="flash_box">
			<volist id="vo" name="hpopt['top_imgs']">
				<li class="switch_item" style="display: list-item;">
					<a href="{$vo['href']}">
					<img alt="首页宣传图片！" src="{:getAttachUrl($vo['img'])}" width="743px" height="300px">
					</a>
				</li>
			</volist>
		</ul>
		<ul id="switch_bar" style="top: 270px;width: 743px;display:none;">
			<volist id="vo" name="hpopt['top_imgs']">
				<li class="switch_bar <php>if($i==1){</php>switch_bar_on<php>}</php>" ><a href="{$vo['href']}">{$i}</a></li>
			</volist>
		</ul>
    </div>
    <!--======banner end=====-->
    <div class="liucheng" style="display:none;">
    	<img src="__PUBLIC__/Images/global/lc_29.jpg" /><span>1.挑选礼物</span>
    	<img src="__PUBLIC__/Images/global/xxy_28.jpg" /><span>2.编辑礼卡</span>
    	<img src="__PUBLIC__/Images/global/xxy_28.jpg" /><span>3.在线支付</span>
    	<img src="__PUBLIC__/Images/global/xxy_28.jpg" /><span>4.发送心意券</span>
    	<img src="__PUBLIC__/Images/global/xxy_28.jpg" /><span>5.对方兑换</span>
      	<div class="clear"></div>
    </div>
    <!--========hotGift start=========-->
    
    <div id="store_json_data" class="hidden">
		<php>
		if(count($partners)>0){
			echo json_encode( format2MapData($partners) );
		}
		</php>
	</div>
	<div class="blank10"></div>
	<div class="blank5"></div>
    <div id="map-box" style=" width: 740px; height: 280px;">
	</div>
    <div class="hotGift" id="products_list">
      	<div class="hotgiftop" style="color: #333333; font-weight: bold;padding: 5px 2px 0px 2px;border-bottom: 2px solid #CC1214;
    				height: 25px; line-height: 25px; overflow: hidden;">热门地点：
      	<volist id="vo" name="tags">
      		<a href="{:U( 'Index://Index/index' , array('tag'=>urlencode($vo['title'])) ) }" 
      			<php>if($tag==$vo['title']){</php> class="tag_bg_selected" style="color:#ffffff;" <php>}else{</php> class="tag_bg" <php>}</php>
      			>{$vo['title']}</a>
      	</volist>
      	<a href="{:U( 'Product://Index/searchp' , array('stype'=>'sale') ) }" class="fr fn red">
      		更多>>
      	</a>
      	</div>
      	<div class="blank10"></div>
      	<div style="padding-left:2px;">
      	<volist id="hvo" name="hotProduct">
			<div class="duclist" style="padding: 3px 2px 7px 2px;" id="p_detail" rel="{$hvo['partner_id']}">
				
				<a title="{$hvo['goods_title']}" href="{:U('Product://Index/detailp',array('shelfid'=>$hvo['shelf_id']))}" 
				 	style="position: relative;display: block; height: 130px; padding-top: 11px; text-align: center; width: 143px;">
					<php>if($hvo['goods_get_type']=='delivery'||$hvo['goods_get_type']=='all'){</php><em class="peisong"><img src="__PUBLIC__/Images/global/icon_peisong.gif"></em><php>}</php>
					<em title="点击，马上送礼！" 
						onclick="k_page_redirect( '{:U('Product://Order/orderEdit',array('shelfid'=>$hvo['shelf_id']))}' )">
							马上送礼
					</em>
					<span></span>
					<img src="{:getPhotoFromThumb($hvo['goods_icon'],130,130)}" alt="{$hvo['goods_title']}" width="125" height="125"></img></a>
				<a href="{:U('Product://Index/detailp',array('shelfid'=>$hvo['shelf_id']))}" >
					<p style="line-height:25px;height: 25px;overflow: hidden;">{$hvo['goods_title']}</p></a>
        		<a href="{:U('Product://Index/detailp',array('shelfid'=>$hvo['shelf_id']))}" >
        			<p class="price" style="font-size: 14px;">{:formatMoney($hvo['shelf_out_price'])}
        				&nbsp;
        				<font style="color: #999999;font-family: Arial,Helvetica,sans-serif;font-size: 10px; font-style: italic;
    							 text-decoration: line-through;">{:formatMoney($hvo['shelf_market_price'])}</font>
    				</p></a>
			</div>
		</volist>
		</div>
      	<div class="clear"></div>
    </div>
    <div class="hotGift" id="products_list">
      	<div class="hotgiftop" style="color: #333333; font-weight: bold;padding: 5px 2px 0px 2px;border-bottom: 2px solid #CC1214;
    				height: 25px; line-height: 25px; overflow: hidden;">可配送礼品：
      	<a href="{:U( 'Product://Index/searchp' , array('stype'=>'sale','gettype'=>'delivery') ) }" class="fr fn red">
      		更多>>
      	</a>
      	</div>
      	<div class="blank10"></div>
      	<div style="padding-left:2px;">
      	<volist id="hvo" name="delProduct">
			<div class="duclist" style="padding: 3px 2px 7px 2px;" id="p_detail" rel="{$hvo['partner_id']}">
				
				<a title="{$hvo['goods_title']}" href="{:U('Product://Index/detailp',array('shelfid'=>$hvo['shelf_id']))}" 
				 	style="position: relative;display: block; height: 130px; padding-top: 11px; text-align: center; width: 143px;">
					<php>if($hvo['goods_get_type']=='delivery'||$hvo['goods_get_type']=='all'){</php><em class="peisong"><img src="__PUBLIC__/Images/global/icon_peisong.gif"></em><php>}</php>
					<em title="点击，马上送礼！" 
						onclick="k_page_redirect( '{:U('Product://Order/orderEdit',array('shelfid'=>$hvo['shelf_id']))}' )">
							马上送礼
					</em>
					<span></span>
					<img src="{:getPhotoFromThumb($hvo['goods_icon'],130,130)}" alt="{$hvo['goods_title']}" width="125" height="125"></img></a>
				<a href="{:U('Product://Index/detailp',array('shelfid'=>$hvo['shelf_id']))}" >
					<p style="line-height:25px;height: 25px;overflow: hidden;">{$hvo['goods_title']}</p></a>
        		<a href="{:U('Product://Index/detailp',array('shelfid'=>$hvo['shelf_id']))}" >
        			<p class="price" style="font-size: 14px;">{:formatMoney($hvo['shelf_out_price'])}
        				&nbsp;
        				<font style="color: #999999;font-family: Arial,Helvetica,sans-serif;font-size: 10px; font-style: italic;
    							 text-decoration: line-through;">{:formatMoney($hvo['shelf_market_price'])}</font>
    				</p></a>
			</div>
		</volist>
		</div>
      	<div class="clear"></div>
    </div>
</div>
<!--=======left end========-->

  <!--=======right start========-->
  <div class="side_content">
 
    <div class="jrtj" style="padding-top: 0px;height:298px;text-align: center;">
	    <span style="font-size:14px;font-weight:bold;margin-top: 10px;
    				margin-left: 0px;height:40px;line-height:40px;color:#CC1214;">这种送礼方式希望你喜欢！</span>
      	<div class="liucheng" style="margin-top: 2px;padding-left:25px;border-top:2px solid #CC1214;">
	    	<div class="clear"></div>
	    	<br><img src="__PUBLIC__/Images/global/xxy_28.jpg" /><span>1.挑选礼物</span>
	    	<div class="clear"></div>
	    	<br><img src="__PUBLIC__/Images/global/xxy_28.jpg" /><span>2.编辑礼卡</span>
	  		<div class="clear"></div>
	    	<br><img src="__PUBLIC__/Images/global/xxy_28.jpg" /><span>3.在线支付</span>
	    	<div class="clear"></div>
	    	<br><img src="__PUBLIC__/Images/global/xxy_28.jpg" /><span>4.发送心意券</span>
	    	<div class="clear"></div>
	    	<br><img src="__PUBLIC__/Images/global/xxy_28.jpg" /><span>5.对方兑换</span>
	      	<div class="clear"></div>
	      	<div class="blank10"></div>
   	 	</div>
    </div>
     
  	   
<style>
.sidebtn_1 {
    background: url("/Public/Images/btn_1.gif") no-repeat scroll 0 0 transparent;
	color: #FFFFFF;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: 35px;
    line-height: 35px;
    margin: 15px 10px;
    text-align: center;
    width: 80px;
}
</style>
	<div class="blank5"></div><div class="blank10"></div>
  
    <div class="Suggestion" style="height:auto;">
    	<php>if(empty($_SESSION['mid'])){</php>
    	<div style="height:38px;border-bottom:2px solid #CC1214;text-align: center;">
    		<span style="font-size:14px;font-weight:bold;
    				height: 38px; line-height: 38px;color:#CC1214;">登录，查看你收到的礼物！</span>
    	</div>
    	<div class="clear"></div>
    	<a class="sidebtn_1 left" style="color: #FFFFFF;" href="{:U('Index://Public/login')}">登&nbsp;&nbsp;录</a>
    	<a class="sidebtn_1 right" style="color: #FFFFFF;" href="{:U('Index://Public/register')}">注&nbsp;&nbsp;册</a>
    	<div class="c"></div>
    	<php>}else{</php>
    	<!-- 显示登录用户信息 -->
    	<div>
    		<div style="height: 55px; padding: 1px; width: 180px;padding:10px">
				<a href="{:U('User://Index/index')}" style="width: 50px;float:left;padding-top:2px">
			    	<img width="50px" height="50px" style="padding:1px;border: 1px solid rgb(128, 152, 168); " 
			       		src="{$mid|getUserFace='m'}">
			 	</a>
			 	<div style="width:115px;float:right;height:38px;overflow:hidden;">
			 	<strong><a href="{:U('User://Index/index')}">{$user['uname']}
		  		</a></strong>
		  		<php>if('sina'==$user['sync_type']){</php>
					<img src="/Public/Images/global/sina24x24.png" style="width:16px" align="absmiddle" title="新浪微博直接登录">
				<php>}</php>
				<php>if('douban'==$user['sync_type']){</php>
					<img src="/Public/Images/global/douban24x24.png" style="width:16px" align="absmiddle" title="豆瓣直接登录">
				<php>}</php>
				</div>
				<div style="width:115px;float:right;">
				<php>if( $user['role']=='user' ){</php>
					<php>if( !empty($user['mobile']) ){</php>
				  		手机：<span title="已绑定此手机号码">{$user['mobile']}</span>
				  	<php>}else{</php>
				  		<a href="{:U('User://Account/security')}#mobile" title="绑定手机号码才能查看收到的礼物！">绑定手机</a>
				  	<php>}</php>
			  	<php>}</php>
			  	<php>if( $user['role']=='agent' ){</php>
				  		联盟会员
			  	<php>}</php>
			  	</div>
			</div>
			<div style="padding:2px 10px 1px 10px; height: 25px; background-color:#F7F7F7; border-top:1px dashed #9F9F9F; clear:both;">
				<div class="honortip">
					<span style="color: #000000;float:right;margin-top:2px; font-weight: bold;">
		   				未使用的{:K('SP_COUPON_NM')}&nbsp;
		   				<a href="{:U('User://Index/receiveList')}">
		   				<font style="color:#FF9600;font-size:20px;font-family: 'Times New Roman';">
		   					<php> echo empty($notUsedCouponNo)?'0':$notUsedCouponNo;</php></font>
		   				</a>
		   				&nbsp;个！
					</span>									
				</div>
			</div>
	   	</div>
    	<div class="c"></div>
    	<php>}</php>
    </div>
    
  	
  
    
    <!--======notice start=======-->
    <div class="blank5"></div>
    <div class="notice"><img src="__PUBLIC__/Images/global/gg_03.jpg" alt="小心意公告" />
      <div class="noticecon" style="border-top:2px solid #CC1214;">
        <ul>
        <volist id="dcvo" name="docdata">
			<li><span><a href="#">[公告]</a></span>
				<a 	title="{$dcvo['title']}"
					href="{:U('Index://Index/bulletin',array('docid'=>$dcvo['document_id']))}" target="_blank">
					{$dcvo['title']}</a>
			</li>
		</volist>
        </ul>
      </div>
    </div>
    
    <div class="blank10"></div><div class="blank5"></div>
    <div class="Suggestion" style="">
    	<div style="height:30px;border-bottom:2px solid #CC1214;">
    		<span style="font-size:14px;font-weight:bold;
    				height: 30px; line-height: 30px; margin-left: 8px;color:#CC1214;">疑问建议</span>
      	
    	</div>
    	<div class="clear"></div>
    	
    	<div class="blank10"></div><div class="blank5"></div>
    	<img src="__PUBLIC__/Images/help-desk.jpg" style="float:right;margin-right: 10px; margin-top: -3px;"/>
    	<div style="float:left;">
		   	<span style="margin-left:20px;">
		   		<a href="{:U('Index://Index/advisoryList')}" title="查看全部提问和建议" 
		   			target="_blank" class="cred fn">查看全部</a>
		   	</span>
		   	<div class="clear"></div>
		   	<span style="margin-left:20px;">
		   		<a class="fn cred" href="javascript:k_show( '{:U('Index://Index/advisory')}',null, '交流对话框' );" 
		   			title="进行提问和建议">我要提问</a>
		   	</span>
	   	</div>
	</div>
	
	<!--======notice end=======-->
	<div class="blank10"></div><div class="blank5"></div>
    <div style="border: 1px solid #E8E8E8;">
		<a href="{:U('Index://Index/help',array('docid'=>'23'))}" target="_blank">
		<img src="__PUBLIC__/Images/recruitment_200.jpg"></a>
	</div>
	
    <div class="blank10"></div><div class="blank5"></div>
	<div><!-- 宽度这里控制 -->
    	<iframe width="202" height="640" class="share_self"  frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?width=202&height=640&fansRow=1&ptype=1&speed=0&skin=4&isTitle=1&noborder=1&isWeibo=1&isFans=1&uid=1937126950&verifier=5382a6e2"></iframe>
	</div>
	
	
  </div>
  <!--=======right end========-->
  <div class="clear"></div>
  <!--======bd_center=====-->

  <div class="blank10"></div>
  <div class="bd_center hidden">
    <div class="hotgiftop" style="border:none; padding-top:12px;">
    <img src="__PUBLIC__/Images/global/xxy_56.jpg" alt="品牌中心" class="fl" />
    <a href="{:U('Product://Brand/index')}" class="fr pt5"><img src="__PUBLIC__/Images/global/xxy_36.jpg" /></a></div>
    <div class="blank8"></div>
    <div class="casecon">
      <div class="blk_18"><a class="LeftBotton" onmousedown="ISL_GoUp_1()" onmouseup="ISL_StopUp_1()" onmouseout="ISL_StopUp_1()" href="javascript:void(0);" target="_self"></a>
        <div class="pcont" id="ISL_Cont_1">
          <div class="ScrCont">
            <div id="List1_1">
              <volist id="bvo" name="brandList">
               		<a class="pl" title="{$bvo['title']}" href="{:U('Product://Brand/detail',array('bid'=>$bvo['id']))}" >
               			<img src="{:getPhotoFromThumb($bvo['brand_icon'],250,250)}" alt="{$bvo['title']}" width="118" height="121"/></a> 
			  </volist>
            </div>
            <div id="List2_1"></div>
          </div>
        </div>
        <a class="RightBotton" onmousedown="ISL_GoDown_1()" onmouseup="ISL_StopDown_1()" onmouseout="ISL_StopDown_1()" href="javascript:void(0);" target="_self"></a>
        <div class="clear"></div>
      </div>
    </div>
  </div>

  <!--======bd_center end=====-->


		<!--礼卡专区
		<div style="width:100%;margin-top:15px;"></div>
		<div class="sline"></div>
		<dl class="graybox slide_box" >
			<dt><div class="fl card"><a href="">礼卡专区</a></div><a href="{:U('Product://Brand/index')}" class="fr more">更多礼卡</a> </dt>
			<dd>
			
				<div class=" jcarousel-skin-tango">
				  	<div style="display: block;" class="jcarousel-container jcarousel-container-horizontal">
				  		<div style="display: block;" class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-disabled jcarousel-prev-disabled-horizontal"></div>
				  		<div style="display: block;" class="jcarousel-next jcarousel-next-horizontal"></div>
					  	<div class="jcarousel-clip jcarousel-clip-horizontal">
					  		<ul style="width: 1200px; left: 0pt;" id="slide_card" class="jcarousel-list jcarousel-list-horizontal">
					  			<volist id="bvo" name="cards">
								<li jcarouselindex="{$i}" class="jcarousel-item jcarousel-item-horizontal jcarousel-item-{$i} jcarousel-item-{$i}-horizontal"
									style="width: 160px;margin-right: 11px;">
									<a title="{$bvo['title']}" href="{:U('Product://Brand/detail',array('bid'=>$bvo['id']))}">
									<img src="{:getPhotoFromThumb($bvo['imgpath'],160,100)}" alt="{$bvo['title']}" style="border:2px solid #EBEBEB;"></img>
									</a>
								</li>
								</volist>
							</ul>
					  	</div>
				  	</div>
			  	</div>
				<div class="clear"></div>
			</dd>
		</dl>
		-->

<include file="../Public/footer.html" />